package cn.tedu.tmall.admin.mall.dao.search.impl;

import cn.tedu.tmall.admin.mall.dao.search.GoodsElasticsearchRepository;
import cn.tedu.tmall.admin.mall.dao.search.IGoodsSearchRepository;
import cn.tedu.tmall.common.pojo.po.GoodsSearchPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public class GoodsSearchRepositoryImpl implements IGoodsSearchRepository {

    @Autowired
    private GoodsElasticsearchRepository goodsElasticsearchRepository;

    @Override
    public void saveAll(List<GoodsSearchPO> goodsList) {
        goodsElasticsearchRepository.saveAll(goodsList);
    }

    @Override
    public void save(GoodsSearchPO goodsSearchPO) {
        goodsElasticsearchRepository.save(goodsSearchPO);
    }

    @Override
    public void deleteAll() {
        goodsElasticsearchRepository.deleteAll();
    }
}
